import api from '@/http/index'

/* 列表 */
export const getTablesList = (data) => {
    return new Promise((resolve, reject) => {
        api.get('/api/MedicalOrdersDTD/GetGridJsonList', data).then((res) => {
            resolve(res);
        }).catch(err => {
            reject(err)
        })
    });
};

/* 获取模块 */
export const getCompany = (data) => {
    return new Promise((resolve, reject) => {
        api.post('/api/Company/GetAll', data).then((res) => {
            resolve(res);
        }).catch(err => {
            reject(err)
        })
    });
};

/* 新建 */
export const addTablesItem = (data) => {
    return new Promise((resolve, reject) => {
        api.post('/api/Company/SubmitForm', data).then((res) => {
            resolve(res);
        }).catch(err => {
            reject(err)
        })
    });
};


/* 根据ID查询详细信息 */
export const getItemInfo = (data) => {
    return new Promise((resolve, reject) => {
        api.post('/api/MedicalOrdersDTD/SubmitFrom', data).then((res) => {
            resolve(res);
        }).catch(err => {
            reject(err)
        })
    });
};
//获取上门服务列表
export const GetServiceList = (data) => {
    return new Promise((resolve, reject) => {
        api.get('/api/MedicalOrdersDTD/GetServiceList', data).then((res) => {
            resolve(res);
        }).catch(err => {
            reject(err)
        })
    });
};
//获取服务省市区
export const GetPCDList = (data) => {
    return new Promise((resolve, reject) => {
        api.get('/api/MedicalOrdersDTD/GetPCDList', data).then((res) => {
            resolve(res);
        }).catch(err => {
            reject(err)
        })
    });
};
//获取城市下的门店列表
export const GetShopList = (data) => {
    return new Promise((resolve, reject) => {
        api.get('/api/MedicalOrdersDTD/GetShopList', data).then((res) => {
            resolve(res);
        }).catch(err => {
            reject(err)
        })
    });
};
//获取门店下的人员列表
export const GetShopUserList = (data) => {
    return new Promise((resolve, reject) => {
        api.get('/api/MedicalOrdersDTD/GetShopUserList', data).then((res) => {
            resolve(res);
        }).catch(err => {
            reject(err)
        })
    });
};